js.underas.controller.AlertMsg = new Class({
	"Extends":js.underas.controller.Controller
	,"initialize":function(p_text){
		var ptext = p_text||"";
		this.parent('div','<div class="inputtt col-xs-12 col-md-12 form-group alert alert-success fade in" data-alert="alert">'+ptext+'</div>'); 
		this.getEle().addClass("AlertMsg col-xs-12 col-md-12");
	}	
	,"setIcon_":function(psrc){
		this.getEle(".inputtt").addClass('imgI glyphicon iconeinput glyphicon-'+psrc);
	}
	,"setText":function(p_text){
		this.getEle(".inputtt").set("text",p_text);
	}
	,"getText":function(){
		return this.getEle(".inputtt").get("text");
	}
	,"setValue":function(p_text){
		this.setText(p_text);
	}
	,"getValue":function(){
		return this.getText();
	}
	,"isPrimaryKey":function(){
		return false;
	}
	,"isValid":function(){
		return true;
	}
	,"setType":function(p_type){
		var classes = this.getEle(".inputtt").get("class");
		var ns = classes.replace(/alert\-([^\s]*)/,"alert-"+p_type);
		this.getEle(".inputtt").erase('class').addClass(ns);
	}
});

js.underas.controller.AlertMsg["TP_SUCCESS"]="success";
js.underas.controller.AlertMsg["TP_INFO"]="info";
js.underas.controller.AlertMsg["TP_WARNING"]="warning";
js.underas.controller.AlertMsg["TP_ERROR"]="danger";
